<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@page import="dto.URLDTO"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Registrar Url</title>
</head>
<body>
	<%
	URLDTO c = (URLDTO)request.getAttribute("usuario");
	String id = null;
	if(c!=null){
		id = String.valueOf(c.getId());	
	}
	String successMsg = "";
	if(!String.valueOf(request.getAttribute("successMsg")).equals("") && request.getAttribute("successMsg")!=null){
		successMsg=String.valueOf(request.getAttribute("successMsg"));
	}
	
	%>
	<form action="ControladorUrl?action=save" method="post">
	<table cellspacing="3" cellpadding="3" border="1" width="60%">	
	<input type="hidden" name="id" value="<%=id!=null?id:""%>">
	<tr>
		<td><b>Direccion:</b> 
	  <td><input type="text" name="url" value="<%=id!=null?c.getUrl():""%>"></td>
	</tr>
	<tr>
		<td><b>Deposito:</b> 
	  <td><input type="text" name="deposito" value="<%=id!=null?c.getDeposito():""%>"></td>
	</tr>
	

	<tr>
		<td colspan="1"><input type="submit" value="Registrar Url"></td>
		<td colspan="1">
		<strong style="color: green;">
		
		<%=successMsg%>
		
		</strong>
		</td>
	</tr>
	</table>
	</form>
</body>
</html>